<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" >

<h:head>
	<title>Modifier un film</title>
	<link rel="stylesheet" type="text/css" href="style.css" />
	<f:metadata>
		<f:viewParam name="idFilmModif" value="#{beanFilm.idCourant}" required="true" requiredMessage="inconnu"/>
	</f:metadata>
</h:head>

<h:body>

	<div id="header">
		<ui:include src="header.xhtml" />
	</div>

		<div class="bobine minH"></div>
		<div id="contenu" class="minH">
			<h:panelGrid styleClass="form_Modif"
				rendered="#{beanUtilisateur.isLoggedIn() == false}">
				<ui:include src="demandeConnexion.xhtml" />
			</h:panelGrid>
			<div class="form modif">
				<h:form id="modifFilm"
					rendered="#{beanUtilisateur.isLoggedIn() == true}">
					<h2>Modifier le film :</h2>
					<h4>Vous pouvez modifier le film en remplacant les
						champs ci-dessous:</h4>
					<h4>Les modifications ne seront effectives qu'après validation de
						l'administrateur</h4>
					<br /> <br />
					<h:form id="Form_ModifFilm">
	
						<h:outputLabel value="#{nomColonnes['label.nom_f']}" />
						<br />
						<h:inputText id="Titre_Film" value="#{beanFilm.film.titre}" default="#{beanFilm.film.titre}">
							<f:validateRequired />
						</h:inputText>
						<br />
						<br />
						
						<h:outputLabel value="#{nomColonnes['label.date_f']}" />
						<br />
						<h:inputText id="Annee_Film" value="#{beanFilm.film.annee}"  default="#{beanFilm.film.annee}">
							<f:validateRequired />
						</h:inputText>
						<br />
						<br />
						<h:outputLabel value="#{nomColonnes['label.cout_f']}" />
						<br />
						<h:inputText id="Cout_Film" value="#{beanFilm.film.cout}" default="#{beanFilm.film.cout}">
							<f:validateRequired />
						</h:inputText>
						<br />
						<br />			
	
						<h:commandButton value="#{nomColonnes['bouton.enregistrer']}"
							type="submit" action="#{beanFilm.modifier}"></h:commandButton>
	
						<h:commandButton value="#{nomColonnes['bouton.retour_menu']}"
							type="reset"></h:commandButton>
					</h:form>
				</h:form>
			</div>
		</div>
		<div class="bobine minH" />

	<div id="footer">Projet réalisé par Aurore Lambin et Pauline
		Fischer</div>
</h:body>

</html>